<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .container div{
            float: left;
            width: 25%;
            height: 100px;
            color: #fff
        }
        .red{
            background: red
        }
        .blue{
            background: blue
        }
        .yellow{
            background: yellow
        }
        .green{
            background: green
        }
        .clearfix:before,
        .clearfix:after {
            display: table;
            content: " ";
        }
        .clearfix:after {
            clear: both;
        }
        .clearfix{
            *zoom: 1;
        }
    </style>    
</head>
<body>
    <div class="container">
        <div class="red">1</div>
        <div class="blue">2</div>
        <div class="yellow">3</div>
        <div class="green">4</div>
    </div>
</body>
</html>